#ifndef __TOPO_MANAGER_H__
#define __TOPO_MANAGER_H__

#include <string>
#include "ogr/ogr_feature.h"
#include "boost/function.hpp"

typedef boost::function<unsigned char (const OGRFeature& feature)>	PriorityFunction;

//This is used to generate and manage topology file when calculate route
class TopoManager
{
public:
	/**
	 * BuildTopo:	build topology file with input source file
	 * @Parameter:	strSourceFile	[in]	Source file file must include line data, Must could be supported by OGR
	 * @Parameter:	strDestFile		[out]	Output topology file name if it is empty the default value if prefix name of source
	 * @Returns:	bool	If build successfully return true else return false
	 */
	bool BuildTopo(const std::string& strSourceFile, const std::string& strDestFile = "");
	
	/**
	 * RegisterPriorityCallBack:	
	 * @Parameter:					function
	 * @Returns:   void
	 */
	void RegisterPriorityCallBack(PriorityFunction function);
};
#endif //__TOPO_MANAGER_H__